package com.lwj.controller;

import com.lwj.service.TeamStatusService;
import com.lwj.util.DataRet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.temporal.Temporal;

/**
 * 用于判断团队状态
 *
 * @author linwj
 * @date 2018/5/11 14:13
 */

@RestController
@RequestMapping("/userStatus")
public class TeamStatusController {

    @Autowired
    private TeamStatusService teamStatusService;

    /**
     * 用户确认邀请
     * @param userId
     * @param teamId
     * @return
     */
    @PostMapping("/ensure")
    public DataRet<String> ensureTeam(int userId,int teamId){
        return teamStatusService.ensureTeam(userId, teamId);
    }
}
